<?php

namespace App\Http\Requests\OpenWechat;

use App\Http\Requests\ApiRequest;

/**
 * Class ImageShareStoreRequest
 * @package App\Http\Requests\OpenWeChat
 * @property string appid
 * @property string image
 * @property string type
 */
class ImageShareStoreRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            "appid" => "required|string",
            "image" => "required|file|max:2048",
        ];
    }

//    public function messages()
//    {
//        return [
//            'appid.*' => 'appid 不能为空',
//            'image.*' => '图片文件不能大于2MB',
//        ];
//    }
}
